From: Marina Zhurakhinskaya Date: Sun, 30 Jan 2011 23:08:20 +0000 (-0500) Subject: Avoid passing 'source' as an argument to Notification::destroy() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9164 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=20b7d3457746633cfff36535c046763b1001d5ea;p=gnome-shell.git Avoid passing 'source' as an argument to Notification::destroy() Notification::destroy() now takes 'reason' as an optional argument. Calling Notification::destroy() directly when connecting to 'destroy' on Source, as we did before, was inadvertently passing 'source' as an argument to the function. https://bugzilla.gnome.org/show_bug.cgi?id=640976 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index c3eb706f9..81997df06 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -274,7 +274,11 @@ Notification.prototype = { this._capturedEventId = 0; this._keyPressId = 0; - source.connect('destroy', Lang.bind(this, this.destroy)); + source.connect('destroy', Lang.bind(this, + // Avoid passing 'source' as an argument to this.destroy() + function () { + this.destroy(); + })); this.actor = new St.Table({ name: 'notification', reactive: true });